package guava;

import com.google.common.eventbus.Subscribe;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @name: OrderMessage
 * @Description: 命令监听者
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ApplyEventListener {

    private String name;
    /**
     * 如果发送了OrderMessage消息，会进入到该函数的处理
     * @param event 消息
     */
    @Subscribe
    public void applyWithEvent(OrderMessage event) {
        // TODO: 收到EventTest消息之后，做相应的处理
        System.out.println(name + "Apply收到了您的命令，命令内容为：" + event.getOrderContent());
    }

}
